laravel create password hash

35

$password = Hash::make('secret');
$data = User::find($id);
if( ! Hash::check( $data->password , Input::get('currPassword') ) )
{
    return Redirect::to('/admin/profile')
        ->with('message', 'Current Password Error !')
        ->withInput();
}
$password = Input::get('passwordformfield'); // password is form field
$hashed = Hash::make($password);

Comments

Submit
0 Comments